7e768e787a2d70d0e0734d920d1387d47a4ca7b5,Mage.Sets/src/mage/sets/planarchaos/BrainGorgers.java,BrainGorgersCounterSourceEffect,apply,#Game#Ability#,94
Before Change
@Override
public boolean apply(Game game, Ability source) {
Spell spell = game.getStack().getSpell(source.getSourceId());
if (spell != null) {
SacrificeTargetCost cost = new SacrificeTargetCost(new TargetControlledCreaturePermanent());
for (UUID playerId : game.getState().getPlayerList(source.getControllerId())) {
cost.clearPaid();
Player player = game.getPlayer(playerId);
if (cost.canPay(source, source.getSourceId(), player.getId(), game)
&& player.chooseUse(outcome, "Sacrifice a creature to counter " + spell.getIdName() + "?", source, game)) {
if (cost.pay(source, game, source.getSourceId(), player.getId(), false)) {
game.informPlayers(player.getLogName() + " sacrifices a creature to counter " + spell.getIdName() + ".");
game.getStack().counter(spell.getId(), source.getSourceId(), game);
}
}
}
After Change
@Override
public boolean apply(Game game, Ability source) {
MageObject sourceObject = source.getSourceObject(game);
if (sourceObject != null) {
SacrificeTargetCost cost = new SacrificeTargetCost(new TargetControlledCreaturePermanent());
for (UUID playerId : game.getState().getPlayerList(source.getControllerId())) {
cost.clearPaid();
Player player = game.getPlayer(playerId);
if (cost.canPay(source, source.getSourceId(), player.getId(), game)
&& player.chooseUse(outcome, "Sacrifice a creature to counter " + sourceObject.getIdName() + "?", source, game)) {
if (cost.pay(source, game, source.getSourceId(), player.getId(), false)) {
game.informPlayers(player.getLogName() + " sacrifices a creature to counter " + sourceObject.getIdName() + ".");
Spell spell = game.getStack().getSpell(source.getSourceId());
if (spell != null) {
game.getStack().counter(spell.getId(), source.getSourceId(), game);
}
}
}